<?
include '/var/www/html/new/d/common/autoload.php';
include '/var/www/html/new/d/common/header.html';
include '/var/www/html/new/d/common/left.html';
include_once '/var/www/html/new/d/module/pwk/class/version.class.php';
include_once '/var/www/html/new/d/module/common/Db.class.php';
$dbConf = include '/var/www/html/new/d/module/common/db.conf.php';
\PFT\Db::Conf($dbConf['remote_1']);
$ver= new Version();
$lists = $ver->ver_sel(100);
$did = $_SESSION['memberID'];
?>
    <script> document.title="系统公告 - <?=$GLOBALS['web_title']?>";</script>
	<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/my_color.css"/>
    <link rel="stylesheet" href="http://www.12301.cc/css/aliceui.min.css">
    <link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/resetui.css"/>
    <link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/ui/updata_notice.css"/>
    <link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/jPages.css" />
<div class="r_content">
    <ul id="tabHead" class="tabHead clearfix"> 
		<li class="profit active">更新公告管理</li> 
	</ul> 
    <div class="notiul">
		<ul id="tagsa">
			<a href="http://www.12301.cc/ver_add.html" class="addnot">写公告</a>
		</ul>
	</div>
    <input value="<?=$did?>" type="hidden" name="did"/>
    <div class="clay">
		<ul class="box" id="itemContainer">
			<?if(count($lists)) {foreach($lists as $list){?>
				<li id="li_<?=$list['id']?>">
<!-- 					<a href="http://www.12301.cc/ver_add.html?action=edit&&id=<?=$list['id']?>" class="date">编辑</a> -->
					<a href="javascript:void(0);" data-id="<?=$list['id']?> "class="date delete_this">删除</a>
					<span class="title">
						<a href="http://www.12301.cc/version.html?id=<?=$list['id'].$sflag?>" target="_blank">[<?=substr($list['access_date'],0, 10)?>]<?=$list['uplog_title']?></a>
					</span>
				</li>
			<?}}?>
		</ul>
    <div class="btn_gray">
        <span id="holder" class="holder"></span>
    </div>
</div>
</div>
<script>
    $("#itemContainer").on("click",".delete_this",function(){
        var id=$(this).attr('data-id');
		if(confirm("您确定要删除本条更新通知？")){
        $.post("http://www.12301.cc/module/pwk/control/version.php",{action:"delete",id:id},function(data){
				if(data.status=="success") {
					alert(data.msg)
				   window.location.reload();
				} else {
				   alert(data.msg)
				}
			},'json');
		}
    });
</script>
<script src="http://www.12301.cc/js/jPages.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://www.12301.cc/js/notice.js"></script>
<script type="text/javascript">
$(function(){
	$("span#holder").jPages({ containerID : 'itemContainer',previous : "←",next : "→",perPage : 15,delay : 1});
});
</script>
<?include("/var/www/html/new/d/common/footer.html")?>